package com.accenture.portal.dao.book;

import java.util.List;

import com.accenture.portal.model.book.BookDetail;

public interface BookDetailMapper
{
	public List<BookDetail> listAllBooks();

	public void saveBook(BookDetail bookDetail);

	public void updateBook(BookDetail bookDetail);

	public void removeBook(Integer bookId);
	
	public void updateBorrowState(Integer borrowId);
	
	public void updateReturnState(Integer borrowId);
	
	public int totalBookCount();
	
	public List<BookDetail> searchBookByPage(int start, int end);
	
	public BookDetail findBookById(int bookId);
	
	public Integer searchBookByNameCount(String bookName);
	
	public List<BookDetail> searchBookByName(String bookName,Integer start,Integer end);
	
	public Integer searchBookByAuthorCount(String bookAuthor);
	
	public List<BookDetail> searchBookByAuthor(String bookAuthor,Integer start,Integer end);
	
	public Integer searchBookByPressCount(String bookPress);
	
	public List<BookDetail> searchBookByPress(String bookPress,Integer start,Integer end);
	
	public Integer searchBookByStatusCount(Integer bookState);
	
	public List<BookDetail> searchBookByStatus(Integer bookState,Integer start,Integer end);
	
	public List<BookDetail> searchBookByKeyword(String keyword);
	
	public Integer fusionSearchBookCount(String bookName,String bookAuthor,String bookPress,String bookState);
	
	public List<BookDetail> fusionSearchBook(String bookName,String bookAuthor,String bookPress,String bookState,Integer start,Integer end);
}
